<template>
	<div class="index" style="background: #edeff0;">
      <top></top>
      <div class="banner flexcc">
        <img src="../../../static/img2/banner.png" style="cursor: pointer;" @click="$router.push('/saishijieshao/detail?id=15&d=true')">
      </div>
      <!-- <div class="nav ww flexcc" style=" border: 1px #ccc solid; margin: 30px auto; border-radius: 10px; overflow: hidden;">
        <div class="nav2">
          <div class="flexcc"><img src="../../../static/img2/n1.jpg" style="width: 80px; margin-bottom: 30px;"></div>
          <div>主办单位</div>
        </div>
        <div class="nav2">
          <div class="flexcc"><img src="../../../static/img2/n2.png" style="width: 80px; margin-bottom: 30px;"></div>
          <div>特色赛事</div>
        </div>
        <div class="nav2">
          <div class="flexcc"><img src="../../../static/img2/n3.png" style="width: 80px; margin-bottom: 30px;"></div>
          <div>大赛视频</div>
        </div>
        <div class="nav2" style="border: 0;">
          <div class="flexcc"><img src="../../../static/img2/n1.jpg" style="width: 80px; margin-bottom: 30px;"></div>
          <div>扫码关注</div>
        </div>
      </div> -->
      <div class="ww flexbc" style="padding: 50px 0;">
        <div style="flex: 1;  margin-right: 50px;">
          <div style="color: #0048baf2; font-size: 24px; font-weight: bold; margin-bottom: 30px;">关于第一届ADIC AI无人机创新文化竞技活动</div>
          <div style="color: #666; line-height: 35px; text-indent: 2em;">

            本次活动是由中国文化信息协会联合中关村华戎军民融合装备新技术发展基金会以及梦工坊青年人才发展中心主办的同时面向全国青少年和成人的大型无人机科普活动。活动创新地采用了电子竞技的组织形式，将容纳能力提升到了百万之众，参与者只需缴纳低廉的报名费就能与来自全国最优秀的无人机爱好者同场竞技，并有机会获得丰厚的奖金和各项殊荣。我们期望通过本次活动，让观众从娱乐走进新质技能竞技场，让竞技选手从竞技场走向专业的殿堂，让专家从专业殿堂走向快乐的文化海洋！

          </div>
          <div style="color: #0048baf2; font-size: 14px; text-align: right; cursor: pointer; justify-content: flex-end; margin-top: 20px; cursor: pointer;" class="flexc" @click="$router.push('/saishijieshao')">查看更多<i class="el-icon-right"></i></div>
        </div>
        <div style="flex: 1;">
          <img  style="cursor: pointer;" @click="$router.push('/saishijieshao/detail?id=15&d=true')" src="../../../static/img2/n4.png"/>
        </div>
      </div>
      <div style="background: #fff; padding: 50px 0;">
        <div class="ww">
          <div class="flexbc" style="margin-bottom: 20px;">
            <div style="color: #0048baf2; font-size: 24px; font-weight: bold; border-bottom: 3px #0048baf2 solid; padding: 0 20px 10px 0;">大赛动态</div>
            <div style="color: #999; font-size: 14px; cursor: pointer;" @click="$router.push('/xinwen')">查看更多<i class="el-icon-right"></i></div>
          </div>
          <div class="flexbc">
            <div style="width: 45%; margin-bottom: 20px;" class="flexbc newli" v-for="item in xinwenlist" :key="item" @click="$router.push('xinwen/detail?id='+item.id+'&name='+item.title)">
              <div class="shengluehao" style="width: 350px;"><i class="el-icon-trophy" style="color: #666; margin-right: 10px;"></i>{{item.title}}</div>
              <div>{{item.create_time}}</div>
            </div>
          </div>
        </div>
      </div>

      <div class="ww" style="padding: 50px 0;">
        <div class="flexcc" style="color: #0048baf2; font-size: 24px; font-weight: bold; margin-bottom: 30px;">
          活动介绍
        </div>
        <div style="text-align: center; color: #666; font-size: 14px; line-height: 35px; margin-bottom: 30px;">

          本次竞技活动将面向初中生、高中生、高职生、大学生及成人，设置海选、模拟竞技和模拟及实战竞技三个阶段，内容涵盖无人机知识科普、虚拟仿真游戏和实际操作对抗，旨在提升参与者对无人机技术的了解和兴趣，培养青少年创新能力和团队协作精神。

        </div>
        <div class="flexc" style="text-align: center; gap:20px">
          <div class="leili" v-for="(item,index) in tableData" :key="item.id" style="background: #fff;" @click="$router.push('/saishijieshao/detail?id='+item.id)">
            <div style="margin-bottom: 20px; overflow: hidden; width: 380px; height: 240px; overflow: hidden; border-bottom: 1px #eaeaea; " class="flexcc"><img :src="item.cover_url"/></div>
            <div>{{item.name}}</div>
          </div>
        </div>
      </div>
      <div style="background: #fff; padding: 50px 0;">
        <div class="ww">
          <div class="flexbc" style="margin-bottom: 20px;">
            <div style="color: #0048baf2; font-size: 24px; font-weight: bold; border-bottom: 3px #0048baf2 solid; padding: 0 20px 10px 0;">最新下载</div>
            <div style="color: #999; font-size: 14px;"  @click="$router.push('/xiazai')">查看更多<i class="el-icon-right"></i></div>
          </div>
          <div class="flexbc">
            <div style="width: 45%; margin-bottom: 20px;" class="flexbc newli" v-for="item in xiazailist" :key="item">
              <div><i class="el-icon-folder-opened" style="color: #666; margin-right: 10px;"></i>{{item.title}}</div>
              <div><el-button type="primary" size="small" @click="xiazai(item)">点击下载</el-button></div>
            </div>
          </div>
        </div>
      </div>

      <div style="padding: 50px 0; background: #3b3b3b;">
        <div class="ww flex">
          <div style="flex: 1;">
            <div style="color: #fff; font-weight: bold; margin-bottom: 30px;">友情链接</div>
            <div class="navli5" style="color: #999; margin-bottom: 10px;">友情链接</div>
          </div>
          <div style="flex: 1;">
            <div style="color: #fff; font-weight: bold; margin-bottom: 30px;">关于ADIC</div>
            <div class="navli5" style="color: #999; margin-bottom: 10px;" v-for="(item,index) in guanyuwomenlist" :key="item" @click="$router.push('/xinwen')" v-if="index<6">{{item.title}}</div>
          </div>
          <div style="flex: 1;">
            <div style="color: #fff; font-weight: bold; margin-bottom: 30px;">大赛动态</div>
            <div class="navli5" style="color: #999; margin-bottom: 10px; cursor: pointer;"  v-for="(item,index) in xinwenlist2" :key="item" @click="$router.push('/xinwen')" v-if="index<6">{{item.name}}</div>

          </div>
          <div style="flex: 1;">
            <div style="color: #fff; font-weight: bold; margin-bottom: 30px;">赛事介绍</div>
            <div class="navli5" style="color: #999; margin-bottom: 10px;" v-for="(item,index) in tableData" :key="item" @click="$router.push('/saishijieshao')" v-if="index<6">{{item.name}}</div>
          </div>
          <div style="flex: 1;">
            <div style="color: #fff; font-weight: bold; margin-bottom: 30px;">下载中心</div>
            <div class="navli5" style="" v-for="(item,index) in xiazailist" :key="item" @click="$router.push('/xiazai')" v-if="index<6">{{item.title}}</div>
          </div>
        </div>
      </div>

      <div class="bottom">
        备案信息
      </div>
	</div>
</template>

<script>
  import top from '../top.vue'
	export default {
		name: 'index',
    components:{
      top
    },
		data() {
			return {
        xinwenlist:[],
        xiazailist:[],
        xinwenlist2:[],
        guanyuwomenlist:[],
        tableData:[]
			}
		},
		created() {
      //比赛
      axios.get(this.IP_URL+'/api/competition/list').then((response)=>{
      	if (response.data.msg.code == 0) {
      		this.tableData = response.data.data.data
          this.total = response.data.data.total

      //     this.tableData.forEach((item,index)=>{

      //       let now = moment()
      //       let time = moment(item.sign_up_time_end)
      //       let miao = time.diff(now, 'seconds')

      //       if (miao > 0) {
      //         this.daojishilist[index] = setInterval(() => {
      //           let result = parseInt(miao--)
      //           if (miao > 0) {
      //             let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math
      //               .floor(result / 3600);
      //             let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 %
      //               60)) : Math.floor((result / 60 % 60));
      //             let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math
      //               .floor((result % 60));

      //             let res = '';
      //             if (h !== '00') res += `${h}小时`;
      //             if (m !== '00') res += `${m}分`;
      //             res += `${s}秒`;

      //             this.$set(this.tableData[index], 'guanmen', res)
      //           } else {
      //             this.$set(this.tableData[index], 'guanmen', '已结束')
      //           }
      //         }, 1000)
      //       }
      //     })
      	} else {
      		this.$message.error(response.data.msg.info);
      	}
      })
      //新闻
      axios.get(this.IP_URL+'/api/news/list?page=1&page_size=10').then((response)=>{
      	if (response.data.msg.code == 0) {
          this.xinwenlist = response.data.data.data
      	} else {
      		this.$message.error(response.data.msg.info);
      	}
      })
      //新闻type
      axios.get(this.IP_URL+'/api/sort/list?type=2').then((response)=>{
      	if (response.data.msg.code == 0) {
          this.xinwenlist2 = response.data.data
      	} else {
      		this.$message.error(response.data.msg.info);
      	}
      })
      //关于我们type
      axios.get(this.IP_URL+'/api/about/list').then((response)=>{
      	if (response.data.msg.code == 0) {
          this.guanyuwomenlist = response.data.data.data
      	} else {
      		this.$message.error(response.data.msg.info);
      	}
      })
      axios.get(this.IP_URL+'/api/down/list',{params:this.search}).then((response)=>{
      	if (response.data.msg.code == 0) {
      		this.xiazailist = response.data.data.data
      	} else {
      		this.$message.error(response.data.msg.info);
      	}
      })

		},
		mounted() {

		},
		methods: {
      xiazai:function(item){
        location.href = item.file_url
      }
    }
	}
</script>


<style scoped >

</style>
